package com.sp2p.dao.admin;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.Date;
import java.util.Map;

import com.shove.data.DataException;
import com.shove.data.DataSet;
import com.shove.data.dao.MySQL;
import com.shove.util.BeanMapUtils;
import com.sp2p.database.Dao;
import com.sp2p.database.Dao.Tables;
import com.sp2p.database.Dao.Tables.t_bankcard;


public class StockFinancingManageDao {
	public Map<String,String> queryFinancingUserInfoCheck(Connection conn,Long id) 
		throws SQLException, DataException{
		String command = "SELECT * from v_pz_user_info where id="
			+id;
		DataSet dataSet = MySQL.executeQuery(conn, command);
		command=null;
		return BeanMapUtils.dataSetToMap(dataSet);
	}
	public Long updatePzUserInfo(Connection conn,Long id,Integer infoStatus,String homsId,String homsPwd) throws SQLException{
		Dao.Tables.pz_user_info pz_user_info = new Dao().new Tables().new pz_user_info();
		pz_user_info.infoStatus.setValue(infoStatus);
		pz_user_info.homsId.setValue(homsId);
		pz_user_info.homsPwd.setValue(homsPwd);
		pz_user_info.auditTime.setValue(new Date());
		return pz_user_info.update(conn, " id="+id);
    }
}
